package com.cctc.rds.nrpc.demo.rpc.router.impl;

import com.cctc.rds.nrpc.core.client.NettyRpcClient;
import com.cctc.rds.nrpc.demo.rpc.HelloRpc;
import com.cctc.rds.nrpc.demo.rpc.impl.HelloRpcRequestImpl;
import com.cctc.rds.nrpc.demo.rpc.router.ClientRpcRouter;

public class HelloClientRpcRouter implements ClientRpcRouter<HelloRpc> {
    private NettyRpcClient client;

    public HelloClientRpcRouter(NettyRpcClient client) {
        this.client = client;
    }

    @Override
    public HelloRpc route() {
        return new HelloRpcRequestImpl(client);
    }
}
